{include file="public/toper"/}
<style>
    .layui-unselect{width: 190px;}
    .layui-form-select dl {width:190px;}
</style>
<div class="x-body">
    <form action="" method="post" class="layui-form" id="forms">
        <input name="record_id" value="{$list.record_id}" type="hidden" />
        <input name="user_id" value="{$list.user_id}" type="hidden" />
        {if condition = "$list.prize_type eq 1"}
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="x-red">*</span>优惠券</label>
            <div class="layui-input-inline">
                <select name="coupons_id">
                    {volist name="$list.coupons" id="vo"}
                    <option value="{$vo.coupons_id}">{$vo.name}</option>
                    {/volist}
                </select>
            </div>
        </div>
        <input name="type" value="2" type="hidden" />
        {elseif condition = "$list.prize_type eq 2" /}
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="x-red">*</span>类型</label>
            <div class="layui-input-inline">
                <select name="type" lay-filter="type">
                    <option value="0">自提</option>
                    <option value="1" selected="selected" >快递</option>
                </select>
            </div>
        </div>

        <div class="layui-form-item k">
            <label class="layui-form-label"><span class="x-red">*</span>快递</label>
            <div class="layui-input-inline">
                <select name="shipping_id">
                    {volist name="$list.shipping" id="vo"}
                    <option value="{$vo.shipping_id}" >{$vo.name}</option>
                    {/volist}
                </select>
            </div>
        </div>

        <div class="layui-form-item k">
            <label class="layui-form-label">
                <span class="x-red">*</span>单号
            </label>
            <div class="layui-input-inline">
                <input type="text" value=""  name="numbers" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>
            </div>
        </div>

        {/if}
        <div class="layui-form-item">
            <label class="layui-form-label"></label>
            <button  class="layui-btn" lay-filter="formSubmit" lay-submit="">提交</button>
        </div>
    </form>
</div>

<script>
    layui.use(['form'], function(){
        $ = layui.jquery;
        var form = layui.form,layer = layui.layer;
        form.on('select(type)', function(data){
            if(data.value==1){
                $(".k").css("display","block");
                form.render('select', 'type');
            }else {
                $(".k").css("display","none");
                form.render('select', 'type');
            }
        });

    });
</script>
{include file="public/footer"/}